package com.qian.saas.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * 
 * @TableName dev
 */
@TableName(value ="dev")
@Data
public class Dev implements Serializable {
    /**
     * 设备id
     */
    @TableId(type = IdType.AUTO)
    private Integer devid;

    /**
     * 设备名称
     */
    private String devname;

    /**
     * 设备类型
     */
    private String devtype;

    /**
     * 设备状态
     */
    private Integer status;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Dev other = (Dev) that;
        return (this.getDevid() == null ? other.getDevid() == null : this.getDevid().equals(other.getDevid()))
            && (this.getDevname() == null ? other.getDevname() == null : this.getDevname().equals(other.getDevname()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getDevid() == null) ? 0 : getDevid().hashCode());
        result = prime * result + ((getDevname() == null) ? 0 : getDevname().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", devid=").append(devid);
        sb.append(", devname=").append(devname);
        sb.append(", status=").append(status);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}